package service

import (
	"context"

	"gitee.com/thewalkers/refactoring-code/model"
)

// PaymentClassificationService acts as a struct for injecting an implementation of EmployeeRepository
// for use in service methods
type PaymentClassificationService struct {
	PaymentClassificationRepository model.PaymentClassificationRepository
}

// PCConfig will hold repository that will eventually be injected into this
// service layer
type PCConfig struct {
	PaymentClassificationRepository model.PaymentClassificationRepository
}

// NewEmployeeService is a factory function for
// initializing a EmployeeService with its repository layer dependencies
func NewPaymentClassificationService(c *PCConfig) model.PaymentClassificationService {
	return &PaymentClassificationService{
		PaymentClassificationRepository: c.PaymentClassificationRepository,
	}
}

func (p *PaymentClassificationService) Create(ctx context.Context, paymentClassification *model.PaymentClassification) error {
	err := p.PaymentClassificationRepository.Create(ctx, paymentClassification)
	return err
}
